//
//  OSPlayViewController.m
//  百思不得姐
//
//  Created by PushMeBaby on 16/3/12.
//  Copyright © 2016年 CoderC. All rights reserved.
//

#import "OSPlayViewController.h"
#import "ZFPlayerView.h"
#import "OSTopic.h"
@interface OSPlayViewController ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *playViewH;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *playViewW;
@property (weak, nonatomic) IBOutlet ZFPlayerView *playView;

@end

@implementation OSPlayViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.playView.videoURL = [NSURL URLWithString:self.topic.videouri];
    
//    __weak typeof(self) weakSelf = self;
    
//    self.playView.goBackBlock = ^{
//        [weakSelf dismissViewControllerAnimated:NO completion:nil];
//    };
    
}
//-(UIStatusBarStyle)preferredStatusBarStyle{
//    return UIStatusBarStyleLightContent;
//}

- (IBAction)back {
    [self.playView stop];
}
-(void)viewWillLayoutSubviews{
    [super viewWillLayoutSubviews];
    
    self.playViewW.constant = OSScreenW;
    self.playViewH.constant = OSScreenW * self.topic.height / self.topic.width;
}



@end
